Learn R Programming

SmarterPoland (version 1.8.1)

Dark Sky API for weather forecast: Access to Weather Forecasts with the Use of Dark Sky API.

Description

Access to hourly and daily weather forecasts with the use of Dark Sky API.

Usage

getWeatherForecast(apiKey, lat = NA, lon = NA, city = NA, raw=FALSE)

Value

The function getWeatherForecast() returns list of three datasets. now and by.hour datasets contains predictions. For each timepoint following information are collected:

time, summary, icon, precipIntensity, precipProbability, temperature, apparentTemperature, dewPoint, humidity, windSpeed, windBearing, visibility, cloudCover, pressure, ozone, temperatureCelsius, apparentTemperatureCelsius

Daily predictions (by.day component) contain following information:

time, summary, icon, sunriseTime, sunsetTime, moonPhase, precipIntensity, precipIntensityMax, precipProbability, temperatureMin, temperatureMinTime, temperatureMax, temperatureMaxTime, apparentTemperatureMin, apparentTemperatureMinTime, apparentTemperatureMax, apparentTemperatureMaxTime, dewPoint, humidity, windSpeed, windBearing, visibility, cloudCover, pressure, ozone, precipIntensityMaxTime, precipType, temperatureMaxCelsius, temperatureMinCelsius, apparentTemperatureMaxCelsius, apparentTemperatureMinCelsius

Arguments

apiKey

You need to have Dark Sky apiKey in order to access weather forecasts. See here: https://developer.forecast.io/ hor more details.

lat

The latitude coordinate for which prediction has to be made.

lon

The longitude coordinate for which prediction has to be made.

city

Instead of lat and lon you may specify name of the city for which prediction has to be made.

raw

If TRUE then no parsing is done. The function getWeatherForecast() just download an forecast and returns it as a list.

Author

Przemyslaw Biecek

References

The Dark Sky API for weather forecasts is described as https://developer.forecast.io/